/// <reference path="references.scss" />

.file-figure {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 0;
}

:is(.file-icon, .file-thumb) {
    align-self: center;
    opacity: 0;
    transition: opacity 0.65s ease;

    &.show {
        opacity: 1;
    }
}

.file-icon {
    position: absolute;
}

.file-thumb {
    position: relative;
    font-size: 1rem; // The size of video play icon

    > img {
        position: relative;
        display: inline-block;
    }

    &.show[data-type=video]:before {
        position: absolute;
        display: block;
        content: '';
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(#000, 0.1);
        z-index: 1;
    }

    &.show[data-type=video]:after {
        @include fontawesome("\f04b", inherit, solid); // fas fa-play
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        color: #fff;
        text-shadow: 1px 1px 1px rgba(#000, 0.5);
        z-index: 2;
    }
}
